home *** CD-ROM | disk | FTP | other *** search
- <WIZSET QueryFieldList = ''>
- <WIZSET FieldCount = '0'>
- <WIZLOOP index="CurrentField" list="$${Fields}">
- <WIZSET FieldCount = FieldCount + 1>
- <!---- field is in format 'sTable.sField=sType;nSize;bRequired' ---->
- <WIZSET SeparatorPos = Find( CurrentField, '=' )>
- <WIZSET TableFieldName = Left( CurrentField, SeparatorPos - 1 )>
- <WIZSET QueryFieldList = QueryFieldList & TableFieldName & ', '>
- </WIZLOOP>
- <WIZSET QueryFieldList = Left( QueryFieldList, Len(QueryFieldList) - 2 )>
-
- <!--- Query returning detail information for selected item --->
- <CFQUERY name="q" dataSource="$${DataSource}">
- SELECT $${QueryFieldList}
- FROM $${Table}
- </CFQUERY>
-
- <HEAD>
- <TITLE>$${ApplicationName}</TITLE>
- </HEAD>
- <BODY>
-
- <SCRIPT LANGUAGE=javascript>
- <!--
- <!--- Include JS conversion library. Instead of this you can
- use the <SCRIPT src=''> tag inside of the HEAD tag. --->
- <CFINCLUDE TEMPLATE='$${LibraryPath}'>
-
- <!--- Use WDDX to move from CFML data to JS --->;
- <CFWDDX ACTION='cfml2js' INPUT='#q#' TOPLEVELVARIABLE='q'>
-
- <!--- Here you can write your JavaScript code that will
- access the values of the recordset in form
- q.field_name[row], where field_name is the name of the
- column in the recordset and row is zero-based row index --->
-
- <!--- EXAMPLE: Display some data --->
- <CFSET fieldName = LCase( ListFirst( q.ColumnList ))>
- <CFOUTPUT>alert('The #fieldName# on the first row is ' + q.#fieldName#[0]);</CFOUTPUT>
- //-->
- </SCRIPT>
-
- </BODY>